# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=stress-ng
pkgver=0.14.00
pkgrel=0
pkgdesc="stress-ng will stress test a computer system in various selectable ways"
url="https://github.com/ColinIanKing/stress-ng"
arch="all"
license="GPL-2.0-or-later"
options="!check" # tests are not portable
makedepends="
	judy-dev
	libaio-dev
	libbsd-dev
	linux-headers
	lksctp-tools-dev
	zlib-dev
	"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/ColinIanKing/stress-ng/archive/refs/tags/V$pkgver.tar.gz"

build() {
	make
}

package() {
	make DESTDIR="$pkgdir" \
		JOBDIR="/usr/share/doc/$pkgname/example-jobs/" install
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	amove usr/share/bash-completion/completions
}

sha512sums="
2e26a2cd7445c4d204959d9ddc505019790cf3992ad85aa727323bb720f3bca4d3032b9e9ef987572356355f63dfbabd7863aa90da4c7e82f84426cbec005ecd  stress-ng-0.14.00.tar.gz
"
